#ifndef DATEOBTENU_H
#define DATEOBTENU_H

#include <Qt>
#include <QDate>
#include "typeprestation.h"
#include "objtosql.h"


class DateObtenu : public objToSQL
{
public:

    static const QString NomChampClientId;
    static const QString NomChampJourConcert;
    static const QString NomChampTarifHT;
    static const QString NomChampTVA;
    static const QString NomChampRepasCompris;
    static const QString NomChampHebergementCompris;
    static const QString NomChampFraisDeplacementCompris;

    DateObtenu();
    DateObtenu(QDate jourConcert, double tarifHT, double TVA, TypePrestation typePrestation, bool isRepasCompris = true,
               bool isHebergementCompris = false, bool isFraisDeplacementCompris = true);
    DateObtenu(QSqlQuery query);

    void setClientId(int id);
    void setJourConcert(QDate jourConcert);
    void setTarifHT(double tarifHT);
    void setTVA(double TVA);
    void setRepasCompris(bool isRepasCompris);
    void setHebergementCompris(bool isHebergementCompris);
    void setFraisDeplacementCompris(bool isFraisDeplacementCompris);
    void setTypePrestation(TypePrestation typePrestation);

    int getClientId()const;
    QDate getJourConcert()const;
    double getTarifHT()const;
    double getTVA()const;
    double getTarifTTC()const;
    bool isRepasCompris()const;
    bool isHebergementCompris()const;
    bool isFraisDeplacementCompris()const;
    TypePrestation getTypePrestation()const;
    void BindValues(QSqlQuery &query, QStringList champs);

    bool operator ==(DateObtenu const& dateObtenu);
    bool isNULL()const;


    static QStringList ListeChampSQL();
    static QStringList ListeTypeDataSQL();
    static QString SQLForeignKey();

    QStringList SQLWhere()const;
    QString SQLSet()const;
    QString SetQuery()const;
    QStringList SetBindValues()const;

private:
    int m_clientId;
    QDate m_jourConcert;
    double m_tarifHT;
    double m_TVA;
    bool m_isRepasCompris;
    bool m_isHebergementCompris;
    bool m_isFraisDeplacementCompris;
    TypePrestation m_typePrestation;

};

#endif // DATEOBTENU_H
